package com.rad.ip.discovery.model;

import java.util.Date;
import javax.persistence.*;

@Table(name = "ip_entry")
public class IpEntry {
    /**
     * 服务id
     */
    @Id
    @Column(name = "service_id")
    private String serviceId;

    /**
     * IP地址
     */
    @Column(name = "ip_address")
    private String ipAddress;

    private String type;

    @Column(name = "create_time")
    private Date createTime;

    @Column(name = "update_time")
    private Date updateTime;

    /**
     * 获取服务id
     *
     * @return service_id - 服务id
     */
    public String getServiceId() {
        return serviceId;
    }

    /**
     * 设置服务id
     *
     * @param serviceId 服务id
     */
    public void setServiceId(String serviceId) {
        this.serviceId = serviceId;
    }

    /**
     * 获取IP地址
     *
     * @return ip_address - IP地址
     */
    public String getIpAddress() {
        return ipAddress;
    }

    /**
     * 设置IP地址
     *
     * @param ipAddress IP地址
     */
    public void setIpAddress(String ipAddress) {
        this.ipAddress = ipAddress;
    }

    /**
     * @return type
     */
    public String getType() {
        return type;
    }

    /**
     * @param type
     */
    public void setType(String type) {
        this.type = type;
    }

    /**
     * @return create_time
     */
    public Date getCreateTime() {
        return createTime;
    }

    /**
     * @param createTime
     */
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    /**
     * @return update_time
     */
    public Date getUpdateTime() {
        return updateTime;
    }

    /**
     * @param updateTime
     */
    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    @Override
    public String toString() {
        return "IpEntry{" +
                "serviceId='" + serviceId + '\'' +
                ", ipAddress='" + ipAddress + '\'' +
                ", type='" + type + '\'' +
                ", createTime=" + createTime +
                ", updateTime=" + updateTime +
                '}';
    }
}